package com.shanzmoo.db.store.entity.vo;

import java.time.LocalDateTime;
import java.io.Serializable;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StoreInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 仓库库位 vo对象
 *
 * @author xueqz 2021-03-03
 */
@Data
@ApiModel("仓库库位-vo对象")
public class StoreInfoVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "仓库ID")
    private Integer id;
    @ApiModelProperty(value = "仓库名称")
    private String name;
    @ApiModelProperty(value = "仓库编码")
    private String code;
    @ApiModelProperty(value = "父级仓库")
    private Integer parentId;
    @ApiModelProperty(value = "仓库级别：1-大仓,2-库区,3-库位")
    private Integer level;
    @ApiModelProperty(value = "仓库级别：0-标准仓库,1-生产仓,2-售后仓")
    private Integer type;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "创建人")
    private Integer createUser;
    @ApiModelProperty(value = "更新人")
    private Integer updateUser;
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    public static StoreInfoVO create(StoreInfoEntity entity) {
        StoreInfoVO vo = new StoreInfoVO();
        BeanUtil.copyProperties(entity, vo, true);
        return vo;
    }
}
